﻿using NExt.Core.Model.Base;

namespace NExt.tree
{
    public class TreePanel : TreePanel<TreePanelEvents>
    {
    }

    public abstract class TreePanel<TEvents>: Panel<TEvents>
        where TEvents : TreePanelEvents, new()
    {
        public bool? animate { get; set; }
        public bool? containerScroll { get; set; }
        public string ddAppendOnly { get; set; }
        public string ddGroup { get; set; }
        public bool? ddScroll { get; set; }
        public object dropConfig { get; set; }
        public bool? enableDD { get; set; }
        public bool? enableDrag { get; set; }
        public bool? enableDrop { get; set; }
        public string hlColor { get; set; }
        public bool? hlDrop { get; set; }
        public bool? lines { get; set; }
        public TreeLoader loader { get; set; }
        public string pathSeparator { get; set; }
        public object root { get; set; }
        public bool? rootVisible { get; set; }
        public bool? selModel { get; set; }
        public bool? singleExpand { get; set; }
    }

    public class TreePanelEvents: PanelEvents
    {
        public IScript append { get; set; }
        public IScript beforeappend { get; set; }
        public IScript beforechildrenrendered { get; set; }
        public IScript beforeclick { get; set; }
        public IScript beforecollapsenode { get; set; }
        public IScript beforeexpandnode { get; set; }
        public IScript beforeinsert { get; set; }
        public IScript beforeload { get; set; }
        public IScript beforemovenode { get; set; }
        public IScript beforenodedrop { get; set; }
        public IScript checkchange { get; set; }
        public IScript click { get; set; }
        public IScript collapsenode { get; set; }
        public IScript contextmenu { get; set; }
        public IScript dblclick { get; set; }
        public IScript disabledchange { get; set; }
        public IScript dragdrop { get; set; }
        public IScript enddrag { get; set; }
        public IScript expandnode { get; set; }
        public IScript insert { get; set; }
        public IScript load { get; set; }
        public IScript movenode { get; set; }
        public IScript nodedragover { get; set; }
        public IScript nodedrop { get; set; }
        public IScript startdrag { get; set; }
        public IScript textchange { get; set; }
    }
}
